package com.yanqu.road.entity.activity.busyfarming;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_u_activity_busy_farming_user_reward")
public class BusyFarmingUserReward extends DataObject {

    @FieldTypeAnnotation(update = true, desc = "按活动自增的ID")
    private long dbId;

    @FieldTypeAnnotation(update = true, desc = "用户ID")
    private long userId;
    @FieldTypeAnnotation(select = true, update = true, desc = "活动ID")
    private int activityId;

    @FieldTypeAnnotation(desc = "好友ID")
    private long friendId;
    @FieldTypeAnnotation(desc = "帮助（1：浇水")
    private int helpType;

    @FieldTypeAnnotation(desc = "参数")
    private List<String> params = new ArrayList<>();

    @FieldTypeAnnotation(desc = "是否领奖")
    private boolean getReward;

    @FieldTypeAnnotation(desc = "奖励")
    private String reward;

    @FieldTypeAnnotation(desc = "是否删除")
    private boolean del;

    @FieldTypeAnnotation(desc = "添加时间")
    private int addTime;

    public long getDbId() {
        return dbId;
    }

    public void setDbId(long dbId) {
        if(this.dbId != dbId) {
            this.dbId = dbId;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if(this.activityId != activityId) {
            this.activityId = activityId;
            setUpdateOption();
        }
    }

    public long getFriendId() {
        return friendId;
    }

    public void setFriendId(long friendId) {
        if(this.friendId != friendId) {
            this.friendId = friendId;
            setUpdateOption();
        }
    }

    public int getHelpType() {
        return helpType;
    }

    public void setHelpType(int helpType) {
        if(this.helpType != helpType) {
            this.helpType = helpType;
            setUpdateOption();
        }
    }

    public List<String> getParams() {
        return params;
    }

    public void setParams(List<String> params) {
        this.params = params;
    }

    public boolean isGetReward() {
        return getReward;
    }

    public void setGetReward(boolean getReward) {
        if(this.getReward != getReward) {
            this.getReward = getReward;
            setUpdateOption();
        }
    }

    public String getReward() {
        return reward;
    }

    public void setReward(String reward) {
        if(!Objects.equals(this.reward, reward)) {
            this.reward = reward;
            setUpdateOption();
        }
    }

    public boolean isDel() {
        return del;
    }

    public void setDel(boolean del) {
        if(this.del != del) {
            this.del = del;
            setUpdateOption();
        }
    }

    public int getAddTime() {
        return addTime;
    }

    public void setAddTime(int addTime) {
        if(this.addTime != addTime) {
            this.addTime = addTime;
            setUpdateOption();
        }
    }
}
